<template>
  <PageWrapper title="基础信息">
    <div class="seedOrder p-4">
      <Description
        title="基本信息"
        :bordered="false"
        :column="columnObj"
        :data="FormData"
        :schema="FormSchema"
      />
      <a-divider />
      <Description
        title="发货信息"
        :bordered="false"
        :column="columnObjTow"
        :data="shipmentData"
        :schema="schemasShipment"
      />
      <a-divider />
      <Description
        title="收货信息"
        :bordered="false"
        :column="columnObjTow"
        :data="receivedData"
        :schema="schemasReceived"
      />
      <a-divider />
      <Description
        title="货物信息"
        :bordered="false"
        :column="columnObjTow"
        :data="goodsData"
        :schema="schemasGoods"
      />
      <a-divider />
      <Description
        title="附加信息"
        :bordered="false"
        :column="columnObjTow"
        :data="extraData"
        :schema="schemasExtra"
      />
      <a-divider />
      <Description title="其他信息" :column="columnObj" :data="otherData" :schema="schemasOther" />
    </div>
  </PageWrapper>
</template>
<script>
  import { defineComponent } from 'vue';
  import { useRouter } from 'vue-router';
  import { PageWrapper } from '/@/components/Page';
  import { Description } from '/@/components/Description/index';
  import {
    FormData,
    FormSchema,
    shipmentData,
    schemasShipment,
    receivedData,
    schemasReceived,
    goodsData,
    schemasGoods,
    extraData,
    schemasExtra,
    otherData,
    schemasOther,
  } from './data';
  export default defineComponent({
    components: {
      PageWrapper,
      Description,
    },
    setup() {
      const router = useRouter();
      let {
        currentRoute: {
          value: {
            query: { orderObj },
          },
        },
      } = router;
      orderObj = JSON.parse(orderObj);
      console.log(orderObj, '---=');

      const columnObj = {
        lg: 4,
        md: 2,
      };
      const columnObjTow = {
        lg: 3,
        md: 2,
      };

      return {
        orderObj,
        FormData,
        FormSchema,
        shipmentData,
        schemasShipment,
        receivedData,
        schemasReceived,
        goodsData,
        schemasGoods,
        extraData,
        schemasExtra,
        otherData,
        schemasOther,
        columnObj,
        columnObjTow,
      };
    },
  });
</script>
<style lang="less" scoped>
  .seedOrder {
    background-color: #fff;
  }

  /deep/.ant-descriptions-item-label {
    width: 160px;
  }
</style>
